package model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Node<K, V> implements Serializable {

    private static final long serialVersionUID = 607730550085625812L;
    
    private Map<K, V> map = new HashMap<K, V>();
    private List<Node<K, V>> list = new ArrayList<Node<K, V>>();
    
    public Node() {
    }

    public Node(Map<K, V> map, List<Node<K, V>> list) {
        super();
        this.map = map;
        this.list = list;
    }

    public Map<K, V> getMap() {
        return this.map;
    }

    public void setMap(Map<K, V> map) {
        this.map = map;
    }

    public List<Node<K, V>> getList() {
        return this.list;
    }

    public void setList(List<Node<K, V>> list) {
        this.list = list;
    }
    
    public V get(K k) {
        return this.map.get(k);
    }
    
    public void put(K k, V v) {
        this.map.put(k, v);
    }
    
    public void add(Node<K, V> node) {
        this.list.add(node);
    }
    
    public static void main(String[] args) {
        Node<String, String> n = new Node<String, String>();
        n.put("TEST", "test value");
        System.out.println(n.get("test"));
    }
}
